﻿<%@ Page Title="" Language="C#" MasterPageFile="~/TimKenSite.Master" AutoEventWireup="true"
    CodeBehind="Message.aspx.cs" Inherits="TimKen.Web.Message" %>

<%--    留言--%>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="Common/Style/PagerStyle.css" rel="stylesheet" type="text/css" />
    <link href="Common/Style/common.css" rel="stylesheet" type="text/css" />
    <script src="Common/Script/js/formValidator_min.js" type="text/javascript"></script>
    <script src="Common/Script/js/formValidatorRegex.js" type="text/javascript"></script>
    <link href="Common/Script/js/validator.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        $(function () {
            $(".nav_li").hover(function () {//鼠标放上去时候的效果
                $(this).children("a").addClass("navon"); //鼠标放上去的加上高亮
                $(this).children("div").show(); //鼠标放上去的二级栏目出来
                $(this).siblings().children("a").removeClass("navon"); //其他的高亮取消
                $(".common_search_tk").css("position", "static");
                $(".common_search_tkicon").hide();
            }, function () {//鼠标移开时候的效果
                $(this).children("a").removeClass("navon"); //鼠标移开去掉高亮
                $(this).children("div").hide(); //鼠标移开隐藏二级栏目
                $(".common_search_tk").css("position", "relative");
                $(".common_search_tkicon").show();
                $(".nav_li:eq(6)").children("a").addClass("navon"); //回到当前栏目高亮
            });
        });
        $(document).ready(function () {
            $(".nav_li:eq(6)").children("a").addClass("navon").parent().siblings().children("a").removeClass();
            $(".left_nav ul li:eq(1)").children("a").addClass("left_navon"); //左侧导航，当前栏目高亮	
        });
        $(document).ready(function () {
            $.formValidator.initConfig({ onerror: function (msg) { alert(msg) } });
            $("#<%=txtTitle.ClientID%>").formValidator({ onshow: '<%=GetLangString("x_TitleNotAllowBlank")%>', onfocus: '<%=GetLangString("x_TitleNotAllowBlank")%>', oncorrect: '<%=GetLangString("InputOK")%>', forcevalid: true }).inputValidator({ min: 1, max: 50, onerror: '<%=GetLangString("x_TitleNotAllowBlank")%>' });
            $("#<%=txtUserName.ClientID%>").formValidator({ onshow: '<%=GetLangString("x_UserNameNotAllowBlank")%>', onfocus: '<%=GetLangString("x_UserNameNotAllowBlank")%>', oncorrect: '<%=GetLangString("InputOK")%>', forcevalid: true }).inputValidator({ min: 1, max: 50, onerror: '<%=GetLangString("x_UserNameNotAllowBlank")%>' });
            $("#<%=txtEmail.ClientID%>").formValidator({ onshow: '<%=GetLangString("x_EmailNotAllowBlank")%>', onfocus: '<%=GetLangString("x_EmailNotAllowBlank")%>', oncorrect: '<%=GetLangString("InputOK")%>', forcevalid: true }).inputValidator({ min: 6, max: 100, onerror: '<%=GetLangString("x_EmailNotValided")%>' }).regexValidator({ regexp: "^([\\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$", onerror: '<%=GetLangString("x_EmailNotValided")%>' });
            $("#<%=txtCompany.ClientID%>").formValidator({ onshow: '<%=GetLangString("x_CompanyNotAllowBlank")%>', onfocus: '<%=GetLangString("x_CompanyNotAllowBlank")%>', oncorrect: '<%=GetLangString("InputOK")%>', forcevalid: true }).inputValidator({ min: 1, max: 50, onerror: '<%=GetLangString("x_CompanyNotAllowBlank")%>' });
            $("#<%=this.btnSubmit.ClientID%>").click(function () {
                if (jQuery.formValidator.pageIsValid())
                    return true;
                return false;
            });
        });
        window.onload = function () { for (var ii = 0; ii < document.links.length; ii++) document.links[ii].onfocus = function () { this.blur() } }
        $(function () {
            $("#<%=btnSubmit.ClientID %>").click(function () {
                if (($("#<%=txtComments.ClientID %>").val().length) > 170) {
                    alert("您的评论字数过多");
                    return false;
                }
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Title" runat="server">
    <div class="left_nav">
        <ul>
            <li><a href="Contact.aspx"><%=GetLangString("MenuJoinUs") %></a></li>
            <li><a href="Message.aspx"><%=GetLangString("MenuContactUS")%></a></li>
        </ul>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="body" runat="server">
    <form id="Form2" runat="server">
    <div class="help_box common_border">
        <ul class="common_page"> 
                <%= GetLangString("Currentposition") %>：<a href="Index.aspx"><%=GetLangString("MenuHome")%></a>/<a href="Service.aspx"><%=GetLangString("MenuContactUS")%></a>/<a href="Gift.aspx"><%=GetLangString("MessageList")%></a>
       
        </ul>
        <ul>
        </ul>
        <h1>
            <%=GetLangString("MenuMessageBoard")%></h1>
        <div class="message_table">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <th scope="row">
                        <%=GetLangString("Title")%>：
                    </th>
                    <td>
                        <asp:TextBox ID="txtTitle" runat="server" EnableViewState="false"></asp:TextBox><div
                            id="<%=txtTitle.ClientID%>Tip">
                    </td>
                </tr>
                <tr>
                    <th scope="row">
                        <%=GetLangString("YourName")%>：
                    </th>
                    <td>
                        <asp:TextBox ID="txtUserName" runat="server" EnableViewState="false"></asp:TextBox><div
                            id="<%=txtUserName.ClientID%>Tip">
                    </td>
                </tr>
                <tr>
                    <th scope="row">
                        E-mail：
                    </th>
                    <td>
                        <asp:TextBox ID="txtEmail" runat="server" EnableViewState="false"></asp:TextBox><div
                            id="<%=txtEmail.ClientID%>Tip">
                    </td>
                </tr>
                <tr>
                    <th scope="row">
                        <%=GetLangString("Company")%>：
                    </th>
                    <td>
                        <asp:TextBox ID="txtCompany" runat="server" EnableViewState="false"></asp:TextBox><div
                            id="<%=txtCompany.ClientID%>Tip">
                    </td>
                </tr>
                <tr>
                    <th scope="row">
                        <%=GetLangString("Address")%>：
                    </th>
                    <td>
                        <asp:TextBox ID="txtAddress" runat="server" EnableViewState="false"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <th scope="row">
                        <%=GetLangString("City")%>：
                    </th>
                    <td>
                        <asp:TextBox ID="txtCity" runat="server" EnableViewState="false"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <th scope="row">
                        <%=GetLangString("Province")%>：
                    </th>
                    <td>
                        <asp:TextBox ID="txtState" runat="server" EnableViewState="false"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <th scope="row">
                        <%=GetLangString("AddressCode")%>：
                    </th>
                    <td>
                        <asp:TextBox ID="txtPostalCode" runat="server" EnableViewState="false"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <th scope="row">
                        <%=GetLangString("Telephone")%>：
                    </th>
                    <td>
                        <asp:TextBox ID="txtPhone" runat="server" EnableViewState="false"></asp:TextBox>
                    </td>
                    </td>
                </tr>
                <tr>
                    <th scope="row">
                        <%=GetLangString("Fax")%>：
                    </th>
                    </th>
                    <td>
                        <asp:TextBox ID="txtFax" runat="server" EnableViewState="false"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <th scope="row">
                        <%=GetLangString("Content")%>：
                    </th>
                    <td style="vertical-align: top;">
                        <asp:TextBox ID="txtComments" runat="server" TextMode="MultiLine" Width="359px" Height="100px"
                            EnableViewState="false"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <th scope="row">
                        &nbsp;
                    </th>
                    <td>
                        <a href="#">
                      <%if (LanguageID == 1)
                        {%>
                            <asp:ImageButton ID="btnSubmit" ImageAlign="AbsMiddle" runat="server" OnClick="btnSubmit_Click"
                                ImageUrl="Common/Image/common/tijiao_btn.gif" Width="60" Height="25" BorderStyle="None" /> 
                      <%}
                        else
                        { %>
                            <asp:ImageButton ID="ImageButton1" ImageAlign="AbsMiddle" runat="server" OnClick="btnSubmit_Click"
                                ImageUrl="Common/Image/common_en/tijiao_btn.gif" Width="60" Height="25" BorderStyle="None" /> 
                      <%} %>
                    </td>
                </tr>
            </table>
        </div>
        <div class="message">
            <h2>
                <%=GetLangString("MessageList")%>
                <asp:ScriptManager ID="ScriptManager1" runat="server">
                </asp:ScriptManager>
            </h2>
            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                <ContentTemplate>
                    <asp:Repeater ID="rptMessageList" runat="server">
                        <ItemTemplate>
                            <!--循环部分-->
                            <ul>
                                <h3>
                                    <%#GetLangString("Title")%>：
                                    <%#Eval("Title")%></h3>
                                <h4>
                                    <span>
                                        <%#GetLangString("MessageUser")%>：<%#Eval("UserName")%></span><%#GetLangString("MessageCreateDate2")%>：<%# Eval("CreateDate", "{0:yyyy-MM-dd}")%></h4>
                                <h5>
                                    <%#GetLangString("MessageContent2")%>：</h5>
                                <li>
                                    <p>
                                        <%#Eval("Comments")%></p>
                                </li>
                                <%#GetReplyContent(Eval("ReplyContent").ToString(), Eval("ReplierID").ToString(), Eval("ReplyDate", "{0:yyyy-MM-dd}").ToString())%><!--生成回复信息-->
                            </ul>
                            <!--循环部分-->
                        </ItemTemplate>
                    </asp:Repeater>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </div>
    <%--     <table cellpadding="0" cellspacing="0" align="center" width="99%" class="border">
            <tr>
                <td align="left" colspan="2">--%>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <ux:AspNetPager ID="AspNetPager1" CssClass="paginator" CurrentPageButtonClass="cpb"
                runat="server" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" Width="95%"
                ShowPageIndexBox="Always" PageSize="8" HorizontalAlign="right" EnableTheming="true"
                AlwaysShow="true" PageIndexBoxType="DropDownList" OnPageChanged="AspNetPager1_PageChanged"
                ButtonImageNameExtension="n" CpiButtonImageNameExtension="r" ShowCustomInfoSection="Left"
                ShowNavigationToolTip="true" CustomInfoTextAlign="Left" LayoutType="Table" 
                CustomInfoHTML="" PrevPageText="上一页" CustomInfoSectionWidth="">
            </ux:AspNetPager>
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--         </td>
            </tr>
        </table>--%>
    </form>
</asp:Content>
